<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { ElMessage } from 'element-plus'

onMounted(() => {
  ElMessage.success('这是一条成功消息')
})
</script>


<template>
  <div class="dashboard-container">
    <!-- 顶部标题区 -->
    <div class="header">
      <h1>数据可视化大屏</h1>
    </div>

    <div class="main-content">
      <!-- 左侧数据区 -->
      <div class="left-panel">
        <div class="panel-item">数据统计1</div>
        <div class="panel-item">数据统计2</div>
      </div>

      <!-- 中间主图表区 -->
      <div class="center-panel">
        <div class="chart-container">主图表区域</div>
      </div>

      <!-- 右侧数据区 -->
      <div class="right-panel">
        <div class="panel-item">数据统计3</div>
        <div class="panel-item">数据统计4</div>
      </div>
    </div>

    <!-- 底部状态区 -->
    <div class="footer">
      <div class="status-item">实时数据更新</div>
      <div class="status-item">系统状态正常</div>
    </div>
  </div>
</template>

<style scoped>
.dashboard-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #0f1c3c;
  color: #fff;
}

.header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #1e90ff;
  background-color: #0a1229;
}

.main-content {
  flex: 1;
  display: flex;
  padding: 10px;
}

.left-panel, .right-panel {
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.center-panel {
  flex: 1;
  margin: 0 10px;
}

.panel-item, .chart-container {
  border: 1px solid #1e90ff;
  border-radius: 4px;
  padding: 15px;
  background-color: rgba(16, 31, 63, 0.8);
}

.chart-container {
  height: 100%;
}

.footer {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid #1e90ff;
  background-color: #0a1229;
}

.status-item {
  padding: 0 15px;
}
</style>
